home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1986 March
/
Ahoy_Magazine_86-03_1986_Double_L.d64
/
edge wedge
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
813b
|
37 lines
10 rem problem #23-1 :
20 rem edge wedge
30 rem
97 rem
98 rem solution by james e. killman
99 rem
100 input"enter string #1";s$
110 l=len(s$)
120 for j=1 to l:poke 214,peek(214)-1
130 print tab(40-len(right$(s$,j)))right$(s$,j)
140 next
197 rem
198 rem solution by russell k. prater
199 rem
200 input"output to 1[146] screen or 2[146] printer 1[157][157][157]";p$
210 d=val(p$)+2:ifd<>3thenifd<>4goto200
220 input"enter string #2";s$:open4,d
230 w=40 : ifd=4 then w=80
240 forj=1 to len(s$)
250 print#4,spc(w-j)right$(s$,j);
260 next : print#4 : close4
297 rem
298 rem solution by robert r. donlon
299 rem
300 input"string #3";s$ : l=len(s$)
310 for x=0tol-1:b$=mid$(s$,l-x,l)
320 print spc(39-x);b$;
330 next
397 rem
398 rem solution by john k. lunde
399 rem
400 input"printer/screen (p/s)";p$:on-(p$<>"p"andp$<>"s")goto 400
410 input"string #4";s$ : if p$="p"then open4,4:cmd4
420 l=len(s$):forx=1tol:z$=z$+" ":next
430 for x=0tol-1:print right$(z$+mid$(s$,l-x),l):next
440 get x : sys62255 :rem close all